package com.example.demo.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.example.demo.dao.UserDao;
import com.example.demo.historyDao.UserHistoryDao;
import com.example.demo.model.User;

@Service
public class UserService {

	@Autowired
	private UserDao userDao;
	
	@Autowired
	private UserHistoryDao userHistoryDao;
	
	public List<User> findList(){
		return userDao.findAll();
	}
	
	@Transactional
	public List<User> findHistoryList(){
		return userHistoryDao.findAll();
	}
	
}
